import numpy as np

def npSum():
    a = np.array([0, 1, 2, 3, 4])
    b = np.array([9, 8, 7, 6, 5])

    c = a ** 2 + b ** 3
    return c
print(npSum())
print()

m = np.ones([4,8])
n = np.zeros_like(m)
print(m)
print(n)

print()

a = np.array([[1,2,3],[4,5,6]])
a1 = np.array(a)    # 浅拷贝
a2 = np.asarray(a)  # 深拷贝
print(a)
print(a1)
print(a2)

print()

m = np.linspace(0, 100, 11)
print(m)

print()

m = np.logspace(0, 2, 3)
print(m)

print()

stock_change.reshape([5, 4])
stock_change.reshape([-1,10])  # 数组的形状被修改为: (2, 10), -1: 表示通过待计算
